package com.dazhi.show.story.tag.controller;

import com.dazhi.show.core.BaseController;
import com.dazhi.show.core.Result;
import com.dazhi.show.story.tag.dao.Tag;
import com.dazhi.show.story.tag.server.TagService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/api/tag")
public class TagController extends BaseController<TagService, Tag> {
    @Resource
    private TagService tagService;

    @GetMapping("/getTagAndEmperor")
    public Result<List<Tag>> getTagAndEmperor(){
        List<Tag> tagAndEmperorList = tagService.getTagAndEmperor();
        return new Result<List<Tag>>(200,"success",tagAndEmperorList);
    }
}
